package com.ruoyi.pv.mapper;

import java.util.List;
import java.util.Map;

import com.ruoyi.pv.domain.PvAppoint;
import com.ruoyi.pv.domain.PvAppointRecord;
import com.ruoyi.pv.domain.PvAppointTime;
import com.ruoyi.pv.domain.vo.PvAppointRecordNumVo;
import com.ruoyi.pv.domain.vo.PvAppointRecordNumVo1;
import com.ruoyi.pv.domain.vo.PvStudentRecordExcelVo;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

/**
 * 预约记录Mapper接口
 *
 * @author zzx
 * @date 2023-04-22
 */
public interface PvAppointRecordMapper {
    /**
     * 查询预约记录
     *
     * @param id 预约记录主键
     * @return 预约记录
     */
    public PvAppointRecord selectPvAppointRecordById(Long id);

    /**
     * 查询预约记录列表
     *
     * @param pvAppointRecord 预约记录
     * @return 预约记录集合
     */
    public List<PvAppointRecord> selectPvAppointRecordList(PvAppointRecord pvAppointRecord);

    /**
     * 新增预约记录
     *
     * @param pvAppointRecord 预约记录
     * @return 结果
     */
    public int insertPvAppointRecord(PvAppointRecord pvAppointRecord);

    /**
     * 修改预约记录
     *
     * @param pvAppointRecord 预约记录
     * @return 结果
     */
    public int updatePvAppointRecord(PvAppointRecord pvAppointRecord);

    /**
     * 删除预约记录
     *
     * @param id 预约记录主键
     * @return 结果
     */
    public int deletePvAppointRecordById(Long id);

    /**
     * 批量删除预约记录
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deletePvAppointRecordByIds(Long[] ids);

    @MapKey("appointTimeId")
    Map<Long,PvAppointRecordNumVo> selectPvAppointRecordCountByAppointAndDateGroupByTime(@Param("appointId") Long appointId, @Param("date") String date);

    List<Map<String, String>> selectNotAppointList(@Param("appointId") Long appointId,@Param("deptId") Long deptId);

    List<PvAppointTime> getAppointTimeListByAppointId(Long appointId);

    List<PvAppointRecordNumVo> selectPvAppointRecordCountByAppointId(Long appointId);

    PvAppoint selectPvAppointList(@Param("appointId") Long appointId);
}
